package com.ms.mall.user.controller;

import com.ms.order.feign.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    OrderService orderService;

    @GetMapping("/getUserOrderInfo/{userId}")
    public String getUserOrderInfo(@PathVariable("userId") Long userId){
        String msg = orderService.getOrderByUserId(userId);
        return "userInfo:"+msg;
    }
}
